<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.io.*,java.sql.*,InvestmentPojo.*,Notifications.*,java.text.DateFormat,java.text.SimpleDateFormat,java.util.Calendar,java.util.Date,java.util.List,java.text.DateFormat,ImmovableIndia.serviceManagerImpl" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Investment gateways</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<% String serviceName = null != request.getAttribute("showServiceName")? request.getAttribute("showServiceName").toString():""; 
String defaultJspPage = null != request.getAttribute("defaultShowServicePage")? (String)request.getAttribute("defaultShowServicePage"):"";
String UserIDForservice = null != request.getAttribute("UserIDForservice")?(String)request.getAttribute("UserIDForservice"):"";
String showUserToolPage = null != request.getAttribute("showUserToolPage")?(String)request.getAttribute("showUserToolPage"):"";

String userId = null != request.getSession().getAttribute("UserID")?(String)request.getSession().getAttribute("UserID"):"";

String defaultShowServicePage = null != request.getAttribute("defaultShowServicePage")?(String)request.getAttribute("defaultShowServicePage"):"";

System.out.println("UserIDForservice"+UserIDForservice);
System.out.println("TOOL"+showUserToolPage);
List li = null != request.getAttribute("returnList")?(List) request.getAttribute("returnList"):null; 

String headerTitle = null != request.getAttribute("headerTitle")?(String)request.getAttribute("headerTitle"):"NOTIFICATIONS";
String name = "";
String DATE_FORMAT_NOW = "yyyyMMdd";
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
String image = "";
Calendar cal = Calendar.getInstance();
serviceManagerImpl smp = new serviceManagerImpl();
long days=0;
int a=1;
int b=1;
%>
<body>
<%if("4".equals(UserIDForservice)){ %>
						  <table width='100%' align='center' border='0'  class='TBFORM' cellspacing ='0' cellpadding='3' valign='center'>
						  <tr align='center' class ='TITLEFORM' ><td colspan='5'><font style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:18px'valign='center' color='white'><b>NOTIFICATIONS - <%=headerTitle.split("~~")[1]%>
						 
						  </b></font></TD></TR>
						  <tr><td class='THFont' width='5%'>Sr No</td><td class='THFont' width ='10%'>Notification Number</td><td class='THFont' width ='10%'>Date of Notification</td><td class='THFont' width='60%'>Summary</td><td class='THFont' width='12%'>Effective date</td></tr>
						 <% if(li.isEmpty()){  %>
							  <tr><td width='90%' colspan='5' class='PH1' align='center'>*** THERE ARE NO RECORDS AVILABLE FOR THIS SECTION ***</td></tr>
						  <% } %>
						  <tr><td colspan='5'>
						   <% if(li.size() > 5){  %>
							  <table width='100%' style='height: 300px; overflow-y: auto; display: block;'>
							<% }else{ %>
							  <table width='100%'>
						<% } if(null != li){
							  for(int i=0;i<li.size();i++){
								  notificationTablePojo obj = (notificationTablePojo)li.get(i);
								  Date dateNow = new Date(obj.getDateofNotification());
								  days=smp.calculateDays(dateNow,cal.getTime());
								  if(days <= 129){ 
										image="<img alt='*' src='images/new.gif'/>";
								  }else {image="";}
								  int j=i+1; %>
								  <%if(obj.getType().equals("Deposits")){ %>
								  <tr onmouseover="style.backgroundColor='#ebe7e4'" onmouseout="style.backgroundColor=''" bgcolor='<%=a % 2 == 0 ? "#F4FFFF" : "white" %>'><td width='5%' class='PH1'><%=a %></td>
								  
								  <td width ="10%" class='PH1'> <a style='color: blue; text-decoration: none; border-bottom: 1px solid green;' href='http://www.investmentgateways.com/NOTIFICATIONS/<%=sdf.format(dateNow)%> NOT <%=obj.getNotificationNo()%>.pdf' target='_blank'><%=obj.getNotificationNo() %></a> <%=image %></td>
								  <td width='10%' class='PH1'><font class='textFont' !important;><%=obj.getDateofNotification() %></font></td><td width='60%' class='PH1'><font class='textFont' !important;><%=obj.getSubjectMatter() %></font></td><td width='10%' class='PH1'><font class='textFont' !important;><%=obj.getEffectiveDate() %></font></td></tr>
						            </tr>
						<% a++; }}%>	 
							  </table></td></tr>
							  </table>
						  <%} %>
						 <br>
						  <table width='100%' align='center' border='0'  class='TBFORM' cellspacing ='0' cellpadding='3' valign='center'>
						  <tr align='center' class ='TITLEFORM' ><td colspan='5'><font style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:18px'valign='center' color='white'><b>NOTIFICATIONS - <%=headerTitle.split("~~")[2].equals("Rupee") ? "Rupee Loans" : "" %>
						 
						  </b></font></TD></TR>
						  <tr><td class='THFont' width='5%'>Sr No</td><td class='THFont' width ='10%'>Notification Number</td><td class='THFont' width ='10%'>Date of Notification</td><td class='THFont' width='60%'>Summary</td><td class='THFont' width='12%'>Effective date</td></tr>
						 <% if(li.isEmpty()){  %>
							  <tr><td width='90%' colspan='5' class='PH1' align='center'>*** THERE ARE NO RECORDS AVILABLE FOR THIS SECTION ***</td></tr>
						  <% } %>
						  <tr><td colspan='5'>
						   <% if(li.size() > 5){  %>
							  <table width='100%' style='height: 300px; overflow-y: auto; display: block;'>
							<% }else{ %>
							  <table width='100%'>
						<% } if(null != li){
							  for(int i=0;i<li.size();i++){
								  notificationTablePojo obj = (notificationTablePojo)li.get(i);
								  Date dateNow = new Date(obj.getDateofNotification());
								  days=smp.calculateDays(dateNow,cal.getTime());
								  if(days <= 129){ 
										image="<img alt='*' src='images/new.gif'/>";
								  }else {image="";}
								  int j=i+1; %>
								  <%if(obj.getType().equals("Rupee")){ %>
								  <tr onmouseover="style.backgroundColor='#ebe7e4'" onmouseout="style.backgroundColor=''" bgcolor='<%=b % 2 == 0 ? "#F4FFFF" : "white" %>'><td width='5%' class='PH1'><%=b %></td>
								  
								  <td width ="10%" class='PH1'> <a style='color: blue; text-decoration: none; border-bottom: 1px solid green;' href='http://www.investmentgateways.com/NOTIFICATIONS/<%=sdf.format(dateNow)%> NOT <%=obj.getNotificationNo()%>.pdf' target='_blank'><%=obj.getNotificationNo() %></a> <%=image %></td>
								  <td width='10%' class='PH1'><font class='textFont' !important;><%=obj.getDateofNotification() %></font></td><td width='60%' class='PH1'><font class='textFont' !important;><%=obj.getSubjectMatter() %></font></td><td width='10%' class='PH1'><font class='textFont' !important;><%=obj.getEffectiveDate() %></font></td></tr>
						            </tr>
						<% b++; }}%>	 
							  </table></td></tr>
							  </table>
						  <%} %>
<%}else { %>
				 <table width='100%' align='center' border='0'  class='TBFORM' cellspacing ='0' cellpadding='3' valign='center'>
						  <tr align='center' class ='TITLEFORM' ><td colspan='5'><font style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:18px'valign='center' color='white'><b>NOTIFICATIONS
						 
						  </b></font></TD></TR>
						  <tr><td class='THFont' width='5%'>Sr No</td><td class='THFont' width ='10%'>Notification Number</td><td class='THFont' width ='10%'>Date of Notification</td><td class='THFont' width='60%'>Summary</td><td class='THFont' width='12%'>Effective date</td></tr>
						 <% if(li.isEmpty()){  %>
							  <tr><td width='90%' colspan='5' class='PH1' align='center'>*** THERE ARE NO RECORDS AVILABLE FOR THIS SECTION ***</td></tr>
						  <% } %>
						  <tr><td colspan='5'>
						   <% if(li.size() > 5){  %>
							  <table width='100%' style='height: 300px; overflow-y: auto; display: block;'>
							<% }else{ %>
							  <table width='100%'>
						<% } if(null != li){
							  for(int i=0;i<li.size();i++){
								  notificationTablePojo obj = (notificationTablePojo)li.get(i);
								  Date dateNow = new Date(obj.getDateofNotification());
								  days=smp.calculateDays(dateNow,cal.getTime());
								  if(days <= 129){ 
										image="<img alt='*' src='images/new.gif'/>";
								  }else {image="";}
								  int j=i+1; %>
								  <tr onmouseover="style.backgroundColor='#ebe7e4'" onmouseout="style.backgroundColor=''" bgcolor='<%=i % 2 == 0 ? "#F4FFFF" : "white" %>'><td width='5%' class='PH1'><%=j %></td>
								  
								  <td width ="10%" class='PH1'> <a style='color: blue; text-decoration: none; border-bottom: 1px solid green;' href='http://www.investmentgateways.com/NOTIFICATIONS/<%=sdf.format(dateNow)%> NOT <%=obj.getNotificationNo()%>.pdf' target='_blank'><%=obj.getNotificationNo()%></a><%=image %></td>
								  <td width='10%' class='PH1'><font class='textFont' !important;><%=obj.getDateofNotification() %></font></td><td width='60%' class='PH1'><font class='textFont' !important;><%=obj.getSubjectMatter() %></font></td><td width='10%' class='PH1'><font class='textFont' !important;><%=obj.getEffectiveDate() %></font></td></tr>
						            </tr>
						<%  }%>	 
							  </table></td></tr>
							  </table>
						  <%} %>
						
<%} %>
</body>
<script>document.getElementById("loadingwait").style.display="none";</script>
</html>
